import fs from 'fs'

export const toBase64URL = async (filepath: string, type='image/png') => {
  const content = await fs.promises.readFile(filepath, "base64");
  return `data:${type};base64,${content}`.replace(/\n/g, "");
};
